<?php 

include './functions.php';
$data=file_get_contents('./db/db.json');
$data=json_decode($data,true);

$data = array_reverse($data);
// krsort($data);
$row=10;//每页显示的行数
$pages=ceil(count($data)/$row);
$page=isset($_GET['page'])?$_GET['page']:1;


$data=array_slice($data,($page-1)*$row,$row,true);

include './Tpl/index.html';

 ?>